package com.itheima.spring.tuling.aop;

import com.itheima.spring.tuling.aop.Introductions.ProgramCalculate;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class MonkeyMainClass {

    public static void main(String[] args) {

        AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(MainConfig.class);


        Calculate calculate = (Calculate) ctx.getBean("monkeyCalculate");
        int retVal = calculate.div(2, 4);

        //引入
        ProgramCalculate pcalculate = (ProgramCalculate) ctx.getBean("monkeyCalculate");
        System.out.println(pcalculate.toBinary(100));
    }
}
